diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php
index b9593b7..ae9d6cd 100644
--- a/system/libraries/Cache/drivers/Cache_memcached.php
+++ b/system/libraries/Cache/drivers/Cache_memcached.php
@@ -10,19 +10,19 @@
  * @license		http://codeigniter.com/user_guide/license.html
  * @link		http://codeigniter.com
  * @since		Version 2.0
- * @filesource	
+ * @filesource
  */
 
 // ------------------------------------------------------------------------
 
 /**
- * CodeIgniter Memcached Caching Class 
+ * CodeIgniter Memcached Caching Class
  *
  * @package		CodeIgniter
  * @subpackage	Libraries
  * @category	Core
  * @author		ExpressionEngine Dev Team
- * @link		
+ * @link
  */
 
 class CI_Cache_memcached extends CI_Driver {
@@ -37,18 +37,18 @@
 					)
 				);
 
-	// ------------------------------------------------------------------------	
+	// ------------------------------------------------------------------------
 
 	/**
 	 * Fetch from cache
 	 *
 	 * @param 	mixed		unique key id
 	 * @return 	mixed		data on success/false on failure
-	 */	
+	 */
 	public function get($id)
-	{	
+	{
 		$data = $this->_memcached->get($id);
-		
+
 		return (is_array($data)) ? $data[0] : FALSE;
 	}
 
@@ -68,7 +68,7 @@
 	}
 
 	// ------------------------------------------------------------------------
-	
+
 	/**
 	 * Delete from Cache
 	 *
@@ -81,7 +81,7 @@
 	}
 
 	// ------------------------------------------------------------------------
-	
+
 	/**
 	 * Clean the Cache
 	 *
@@ -106,7 +106,7 @@
 	}
 
 	// ------------------------------------------------------------------------
-	
+
 	/**
 	 * Get Cache Metadata
 	 *
@@ -140,6 +140,7 @@
 	{
 		// Try to load memcached server info from the config file.
 		$CI =& get_instance();
+
 		if ($CI->config->load('memcached', TRUE, TRUE))
 		{
 			if (is_array($CI->config->config['memcached']))
@@ -149,24 +150,24 @@
 				foreach ($CI->config->config['memcached'] as $name => $conf)
 				{
 					$this->_memcache_conf[$name] = $conf;
-				}				
-			}			
+				}
+			}
 		}
 
-                if (class_exists('Memcached')) 
-                {
-                        $this->_memcached = new Memcached();
-                }
-                else if (class_exists('Memcache')) 
-                {
-                        $this->_memcached = new Memcache();
-                }
-                else 
-                {
-                        log_message('error', 'Failed to create object for Memcached Cache; extension not loaded?');
+		if (class_exists('Memcached'))
+		{
+			$this->_memcached = new Memcached();
+		}
+		else if (class_exists('Memcache'))
+		{
+			$this->_memcached = new Memcache();
+		}
+		else
+		{
+			log_message('error', 'Failed to create object for Memcached Cache; extension not loaded?');
 
-                        return FALSE;        
-                }
+			return FALSE;
+		}
 
 		foreach ($this->_memcache_conf as $name => $cache_server)
 		{
@@ -174,43 +175,42 @@
 			{
 				$cache_server['hostname'] = $this->_default_options['default_host'];
 			}
-	
+
 			if ( ! array_key_exists('port', $cache_server))
 			{
 				$cache_server['port'] = $this->_default_options['default_port'];
 			}
-	
+
 			if ( ! array_key_exists('weight', $cache_server))
 			{
 				$cache_server['weight'] = $this->_default_options['default_weight'];
 			}
-	
-                        if (get_class($this->_memcached) == 'Memcache') 
-                        {
-                                // Third parameter is persistance and defaults to TRUE.
-                                $this->_memcached->addServer(
-                                        $cache_server['hostname'], 
-                                        $cache_server['port'], 
-                                        TRUE, 
-                                        $cache_server['weight'] 
-                                );
-                        }
-                        else 
-                        {
-                                $this->_memcached->addServer(
-                                        $cache_server['hostname'], 
-                                        $cache_server['port'], 
-                                        $cache_server['weight'] 
-                                );
-                        }
+
+			if (get_class($this->_memcached) == 'Memcache')
+			{
+				// Third parameter is persistance and defaults to TRUE.
+				$this->_memcached->addServer(
+					$cache_server['hostname'],
+					$cache_server['port'],
+					TRUE,
+					$cache_server['weight']
+				);
+			}
+			else
+			{
+				$this->_memcached->addServer(
+					$cache_server['hostname'],
+					$cache_server['port'],
+					$cache_server['weight']
+				);
+			}
 		}
 
-                return TRUE;
+		return TRUE;
 	}
 
 	// ------------------------------------------------------------------------
 
-
 	/**
 	 * Is supported
 	 *
@@ -219,14 +219,13 @@
 	 */
 	public function is_supported()
 	{
-                if ( ! extension_loaded('memcached') && ! extension_loaded('memcache'))
+		if ( ! extension_loaded('memcached') && ! extension_loaded('memcache'))
 		{
 			log_message('error', 'The Memcached Extension must be loaded to use Memcached Cache.');
-			
+
 			return FALSE;
 		}
 
-                
 		return $this->_setup_memcached();
 	}
 
